package com.zxq.ai.application.gateway.mt;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum MTErrorCodeEnum {
    // 平台返回状态码
    REQUEST_SUCCESS(0, "request_success", "成功"),
    REQUEST_ERROR(1, "request_error", "服务器异常,未知错误"),
    PARAM_ERROR(2, "param_error", "参数异常,请检查请求中是否缺少必传参数"),
    SIGNATURE_ERROR(3, "signature_error", "签名验证失败"),
    AUTHORITY_ERROR(4, "authority_error", "权限验证失败，请检查外卖或者团购门店是否绑定"),
    APP_AUTH_TOKEN_ERROR(5, "app_auth_token_error", "令牌错误"),
    IP_ERROR(6, "ip_error", "ip不在白名单中"),
    REQUEST_METHOD_ERROR(7, "request_method_error", "http请求方式错误"),
    MYSQL_SYNTAX_ERROR(8, "mysql_syntax_error", "sql语句执行异常"),

    // 业务返回状态码
    POI_CLAIM_ERR(101, "poi_claim_err", "门店认领失败"),
    POI_LIST_ERR(102, "poi_list_err", "获取门店列表失败"),
    BUSINESS_ERR(103, "business_err", "业务参数错误"),
    EPOIID_ERR(104, "epoiid_err", "门店id参数错误"),
    POIID_ERR(105, "poiid_err", "门店id 参数错误"),
    SHANHUI_RPC_ERROR(201, "shanhui_rpc_error", "闪惠RPC接口异常"),
    SHANHUI_PARSE_ERROR(202, "shanhui_parse_error", "闪惠接口返回值解析异常"),
    SHANHUI_ORDER_NOT_EXIST(203, "shanhui_order_not_exist", "不存在满足要求的订单"),
    WAIMAI_SYSTEM_ERROR(700, "waimai_system_error", "系统错误"),
    WAIMAI_PARAM_MISSING(701, "waimai_param_missing", "缺少参数，数据不完整"),
    WAIMAI_APP_NOT_EXIST(702, "waimai_app_not_exist", "app_id不存在"),
    WAIMAI_SIGN_ERROR(703, "waimai_sign_error", "签名验证错误"),
    WAIMAI_UN_PERMISSION(704, "waimai_un_permission", "没有权限操作这条数据"),
    WAIMAI_PARAM_ERROR(705, "waimai_param_error", "参数格式错误"),
    WAIMAI_DISH_MISSING_CATEGORY(706, "waimai_dish_missing_category", "缺少品类信息"),
    WAIMAI_POI_HAD_EXIST(801, "waimai_poi_had_exist", "已经存在此门店，不能重复创建"),
    WAIMAI_POI_NOT_UPDATE_COORDINATE(802, "waimai_poi_not_update_coordinate", "不能修改门店经纬度"),
    WAIMAI_POI_NOT_EXIST(803, "waimai_poi_not_exist", "不存在此门店"),
    WAIMAI_DISH_HAD_EXIST(804, "waimai_dish_had_exist", "已经存在此菜品，不能重复创建"),
    WAIMAI_DISH_NOT_EXIST(805, "waimai_dish_not_exist", "不存在此菜品"),
    WAIMAI_ORDER_NOT_EXIST(806, "waimai_order_not_exist", "不存在此订单"),
    WAIMAI_POI_SAMED_NAME(807, "waimai_poi_samed_name", "同一个城市内的门店名字重复"),
    WAIMAI_ACTION_ERROR(808, "waimai_action_error", "操作失败（如订单在操作时，状态已变更等情况"),
    COUPON_HTTP_ERROR(1001, "coupon_http_error", "券码服务接口异常"),
    COUPON_PARSE_ERROR(1002, "coupon_parse_error", "券码服务返回值解析异常"),
    COUPON_EXECTOR_ERROR(1003, "coupon_exector_error", "异步写入数据失败"),
    COUPON_PARAM_ERROR(1004, "coupon_param_error", "券码服务参数格式错误"),
    COUPON_PERMISSION_ERROR(1005, "coupon_permission_error", "用户没有操作权限"),
    COUPON_CANCEL_ERROR(1006, "coupon_cancel_error", "券码超出可撤销时间范围"),
    COUPON_CODE_NOT_EXIST(1007, "coupon_code_not_exist", "券码不存在"),
    REMOTE_ERROR(1008, "remote_error", "调用接口失败"),
    COUPON_QUERY_TRADE_DETAIL_FAIL(1009, "coupon_query_trade_detail_fail", "查询团购订单结算明细失败"),
    COUPON_TRADE_DETAIL_NOT_EXIST(1010, "coupon_trade_detail_not_exist", "团购订单结算明细不存在"),
    UISDK_TIMESTAMP_EXPIRE(1502, "uisdk_timestamp_expire", "时间戳已经过期。请检查时间戳时间及单位是否正确：UISDK的timestamp单位是毫秒；接口中的timestamp单位是秒"),
    UISDK_SIGN_ERROR(1503, "uisdk_sign_error", "sign签名错误。请检查sign签名构造是否正确"),
    ;

    private final int code;
    private final String errorCode;
    private final String description;

}
